package com.photoeditor.demo.model.face;

import com.photoeditor.demo.statistics.StatisticsConstant;

public class ErrorType {


    public static final int RESULT_SUCCESS = 1;
    public static final int RESULT_NO_FACE_CLIENT = 2;
    public static final int RESULT_NO_FACE_ONLINE = 3;
    public static final int RESULT_OTHER = 4;
    public static final int RESULT_LIMIT_TIME = 5;
    public static final int RESULT_MORE_FACE = 6;
    public static final int RESULT_PARSE_IMG_ERROR = 7;

    public static String getErrorTypeByReturnType(int retType) {
        switch (retType) {
            case RESULT_LIMIT_TIME:
                return StatisticsConstant.REQUEST_PAGE_VALUE_REASON_LIMIT;
            case RESULT_NO_FACE_ONLINE:
                return StatisticsConstant.REQUEST_PAGE_VALUE_REASON_BADFACE;
            case RESULT_NO_FACE_CLIENT:
                return StatisticsConstant.REQUEST_PAGE_VALUE_REASON_BADFACE;
            case RESULT_OTHER:
                return StatisticsConstant.REQUEST_PAGE_VALUE_REASON_OTHER;
            case RESULT_MORE_FACE:
                return StatisticsConstant.REQUEST_PAGE_VALUE_REASON_BADFACE;
            default:
                return StatisticsConstant.REQUEST_PAGE_VALUE_REASON_OTHER;
        }
    }
}
